#include <bits/stdc++.h>
using namespace std;
int main() {
    int val[10];
    for(int i = 1;i <= 6;i ++) {
        cin>>val[i];
    }
    int maxx = 0;
    int minn = 0x3f3f3f3f;
    int sum = 0;
    for(int i = 1;i <= 6;i ++) {
        maxx = max(maxx,val[i]);
        minn = min(minn,val[i]);
        sum += val[i];
    }
    sum -= maxx;
    sum -= minn;
    printf("%.2lf",1.00 * sum / 6);
    return 0;
}